package com.ehotting.edsta.circuitDesign.enums;

public enum StorageTypeEnum implements BaseEnum {


    OTHER(0,"other","无"),
    SDRAM(1,"sdram","SDRAM"),
    FLASH(2,"flash","Flash"),
    TF(3,"tf","TF卡");

    private Integer value;
    private String name;
    private String code;

    StorageTypeEnum(Integer value, String code, String name) {
        this.value = value;
        this.code = code;
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public static StorageTypeEnum getStorageTypeEnumByName(String name) {
        StorageTypeEnum[] values = StorageTypeEnum.values();
        for (StorageTypeEnum value : values) {
            if (value.getName().equals(name)) {
                return value;
            }
        }
        return StorageTypeEnum.OTHER;
    }
}
